<!doctype html>
<html>
<?php echo $this->fetch('head.html'); ?>

<body>
<div class="header" >
  <div  class="left-btn pointer" onClick="window.location='<?php echo $this->_var['appkoudai']; ?>'"><span class="iconfont icon-back"></span></div>
  <div class="title">订单管理</div>
   
</div>
<div class="row">
  <style>
    	.tbs .item{width:20%; float:left; text-align:center; display:block; height:30px; line-height:30px;}
		.tbs .item.active{border-bottom:1px solid #f60;}
    </style>
  <div class="tbs"> <a href="<?php echo $this->_var['appkoudai']; ?>?m=koudai_order&status=0" class="item <?php if (get ( 'status' ) == 0): ?>active<?php endif; ?>">未确认</a> <a href="<?php echo $this->_var['appkoudai']; ?>?m=koudai_order&status=1" class="item <?php if (get ( 'status' ) == 1): ?>active<?php endif; ?>">待发货</a> <a href="<?php echo $this->_var['appkoudai']; ?>?m=koudai_order&status=2" class="item <?php if (get ( 'status' ) == 2): ?>active<?php endif; ?>">待完成</a> <a href="<?php echo $this->_var['appkoudai']; ?>?m=koudai_order&status=3" class="item <?php if (get ( 'status' ) == 3): ?>active<?php endif; ?>">已完成</a> <a href="<?php echo $this->_var['appkoudai']; ?>?m=koudai_order&status=10" class="item <?php if (get ( 'status' ) == 4): ?>active<?php endif; ?>">已取消</a> </div>
</div>
<div class="row">
  <form method="get" action="<?php echo $this->_var['appkoudai']; ?>">
    <input type="hidden" name="m" value="koudai_order" />
    <input type="hidden" name="a" value="default" />
    <div class="pd-5" id="searchBox" style="display:none">
      <div class="input-row">
        <label >订单号</label>
        <input type="text" name="orderno" value="<?php echo $_GET['orderno']; ?>" />
      </div>
      <div class="input-row">
        <label>用户</label>
        <input type="text" name="nickname" value="<?php echo $_GET['nickname']; ?>" />
      </div>
      <div class="input-row">
        <select name="s_status" class="txt">
          <option value="-1">请选择状态</option>
          
<?php $_from = $this->_var['order_status_list']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('k', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['k'] => $this->_var['c']):
?>
<?php if ($this->_var['k'] < 99): ?>
          <option value="<?php echo $this->_var['k']; ?>" <?php if ($_GET['s_status'] == $this->_var['k']): ?> selected="selected" <?php endif; ?>><?php echo $this->_var['c']; ?></option>
          <?php endif; ?>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

        </select>
      </div>
      <div class="form-btns">
        <button type="submit"   class="btn btn-warning btn-row" />
        搜索
        </button>
      </div>
    </div>
  </form>
 
	<div class="market_tabs">
    		<div class="first_item">共<?php echo $this->_var['rscount']; ?>笔</div>
         
        	<ul class="last_item">
              <li class="b3"><a href="<?php echo $this->_var['baseurl']; ?>&orderby=id&index=<?php if (get ( 'orderby' ) == 'id' && get ( 'index' ) == 'asc'): ?>desc<?php else: ?>asc<?php endif; ?>" class="<?php if (get ( 'orderby' ) == 'id'): ?>cur<?php endif; ?>">时间</a></li>
              <li class="b2"><i class="ico top  <?php if (get ( 'index' ) == 'asc'): ?>cur<?php endif; ?>"></i><br>
                <i class="ico bot <?php if (get ( 'index' ) == 'desc'): ?>cur<?php endif; ?>"></i></li>
              <li class="b1"><a href="<?php echo $this->_var['baseurl']; ?>&orderby=sushe&index=<?php if (get ( 'orderby' ) == 'sushe' && get ( 'index' ) == 'desc'): ?>asc<?php else: ?>desc<?php endif; ?>" class="<?php if (get ( 'orderby' ) == 'sushe'): ?>cur<?php endif; ?>">寝室号</a></li>
            </ul>
         
    </div>
  <?php $_from = $this->_var['scorder']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('scid', 'sc');if (count($_from)):
    foreach ($_from AS $this->_var['scid'] => $this->_var['sc']):
?>
  <div class="kdhd"><?php echo $this->_var['sitecitys'][$this->_var['sitecitys'][$this->_var['scid']][pid]][title]; ?></div>
  <?php $_from = $this->_var['sc']['order']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
  <table class="kdtable">
    <tr onClick="window.location='<?php echo $this->_var['appkoudai']; ?>?m=koudai_order&a=show&order_id=<?php echo $this->_var['c']['order_id']; ?>'">
      <td class="kl">个人</td>
      <td class="km">
      	<div class="pd">
      <div class="hd"> 
      	<span class="left"><?php echo $this->_var['c']['address']['p_c_t']; ?>-<?php echo $this->_var['c']['address']['sushe']; ?>寝室</span> 
      	<span class="right">订单号:<?php echo $this->_var['c']['orderno']; ?></span> 
      </div>
        <div class="address"><span class="left">共<span class="cor1"><?php echo $this->_var['c']['num']; ?></span>件 合计￥<span class="cor1"><?php echo $this->_var['c']['money']; ?></span></span> <span class="right f16"><?php echo $this->_var['c']['address']['truename']; ?></span> </div>
        <div class="dateline"><?php echo date("Y-m-d H:i:s",$this->_var['c']['dateline']); ?></div>
         
       
        </td>
      <td class="kr">&gt</td>
    </tr>
  </table>
  <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
  <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
  <?php echo $this->_var['pagelist']; ?> </div>
<script language="javascript" src="/plugin/My97DatePicker/WdatePicker.js"></script> 
<script>
$(function(){
	
	$("#showSearch").on(CLICK,function(){
		$("#searchBox").toggle();
	});
	
})
</script> 
<?php echo $this->fetch('footer.html'); ?>
